import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history', // 访问路径不带井号
  routes: [
    {
      path: '/h',
      name: 'HelloWorld',
      // 使用懒加载
      component: resolve => require(['@/components/HelloWorld'], resolve)
    },
    {
      path: '/',
      name: 'test',
      // 使用懒加载
      component: resolve => require(['@/pages/test'], resolve)
    },
    {
      path: '/test1',
      name: 'test1',
      // 使用懒加载
      component: resolve => require(['@/pages/test1'], resolve)
    }
  ]
})
